﻿using SqlSugar;
using System;
using System.Collections.Generic;

namespace Hx.ADSyncPlatform.Entity.Entities
{
    ///<summary>
    ///
    ///</summary>
    public partial class Plat_SysRole
    {
        public Plat_SysRole()
        {


        }

        [SugarColumn(IsPrimaryKey = true)]
        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:False
        /// </summary>           
        public Guid RoleID { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string RoleName { get; set; }

        /// <summary>
        /// Desc:管理员级别：0:超级管理员 1:高级管理员 2:普通管理员
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? RoleLevel { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnable { get; set; }
        public string RoleCode { get; set; }
        public string Remark { get; set; }

        [SugarColumn(IsIgnore = true)]
        public bool IsSuperAdmin => this.RoleLevel == 0 && this.RoleName == "超级管理员";

        [SugarColumn(IsIgnore = true)]
        public List<Guid> permissionIds { get; set; }
    }
}
